﻿@model ZhongheCms.Models.GswTblCustomer
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="row">
    <div class="col-xs-12 col-sm-12 widget-container-col">
        @using (Html.BeginForm("Create", "Customer", new { id = Model.Id, ViewBag.m, ViewBag.f, ViewBag.p, ViewBag.fid, ViewBag.keywords }, FormMethod.Post,
            new { name = "myForm", id = "myForm", @class = "form-horizontal", role = "form" }))
        {
            <div class="widget-box">
                <div class="widget-header">
                    <h5 class="widget-title">客户信息</h5>

                    <div class="widget-toolbar">
                    </div>
                </div>

                <div class="widget-body">


                    <div class="widget-main">

                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="CustomerNo">客户编号</label>

                            <div class="col-sm-9">
                                <input type="text" id="CustomerNo" name="CustomerNo" placeholder="客户编号" value="@Model.CustomerNo"  class="col-xs-10 col-sm-5" data-val="true" data-val-required="字段不允许为空" />

                                <span class="field-validation-valid help-block" data-valmsg-for="CustomerNo" data-valmsg-replace="true"></span>
                            </div>
                        </div>

                        <div class="hr hr-2 dotted"></div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="CusShortName">客户简称</label>

                            <div class="col-sm-9">
                                <input type="text" id="CusShortName" name="CusShortName" placeholder="客户简称" value="@Model.CusShortName" class="col-xs-10 col-sm-5"  data-val="true" data-val-required="字段不允许为空"  />
                                <span class="field-validation-valid help-block" data-valmsg-for="CusShortName" data-valmsg-replace="true"></span>
                            </div>
                        </div>

                        <div class="hr hr-2 dotted">
                        </div>
                      
                          <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="CustomerName">
                               客户名称</label>
                            <div class="col-sm-9">
                                
                                 <input class="col-xs-10 col-sm-5" type="text" id="CustomerName" name="CustomerName"  value="@Model.CustomerName" />
                            </div>
                        </div>
                        <div class="hr hr-2 dotted">
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="Contact">
                                联系人</label>
                            <div class="col-sm-9">
                                <input type="text" id="Contact" name="Contact"  class="col-xs-5 col-sm-5"  value="@Model.Contact" />
                            </div>
                        </div>
                        <div class="hr hr-2 dotted">
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="Tel">
                                联系电话</label>
                            <div class="col-sm-9">
                                <input class="col-xs-10 col-sm-5" type="text" id="Tel" name="Tel"  value="@Model.Tel" />
                            </div>
                        </div>
                        <div class="hr hr-2 dotted">
                        </div>
                       
                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="Fax">
                                传真</label>
                            <div class="col-sm-9">
                                <input class="col-xs-10 col-sm-5" type="text" id="Fax" name="Fax"  value="@Model.Fax" />
                            </div>
                        </div>
                        <div class="hr hr-2 dotted">
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="Email">
                                电子邮件</label>
                            <div class="col-sm-9">
                                <input class="col-xs-10 col-sm-5" type="text" id="Email" name="Email"  value="@Model.Email" />
                            </div>
                        </div>
                        <div class="hr hr-2 dotted">
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="BankName">
                                开户行</label>
                            <div class="col-sm-9">
                                <input class="col-xs-10 col-sm-5" type="text" id="BankName" name="BankName"  value="@Model.BankName" />
                            </div>
                        </div>
                        <div class="hr hr-2 dotted">
                        </div>
                       
                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="BankNo">
                                账号</label>
                            <div class="col-sm-9">
                                <input class="col-xs-10 col-sm-5" type="text" id="BankNo" name="BankNo"  value="@Model.BankNo" />
                            </div>
                        </div>
                        <div class="hr hr-2 dotted">
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="TaxNo">
                                税号</label>
                            <div class="col-sm-9">
                                <input class="col-xs-10 col-sm-5" type="text" id="TaxNo" name="TaxNo"  value="@Model.TaxNo" />
                            </div>
                        </div>
                        <div class="hr hr-2 dotted">
                        </div>
                          <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="Address">
                                地址</label>
                            <div class="col-sm-9">
                                
                                 <input class="col-xs-12 col-sm-6" type="text" id="Address" name="Address"  value="@Model.Address" />
                            </div>
                        </div>
                        <div class="hr hr-2 dotted">
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="WebUrl">
                                网址</label>
                            <div class="col-sm-9">
                                <input class="col-xs-12 col-sm-6" type="text" id="WebUrl" name="WebUrl"  value="@Model.WebUrl" />
                            </div>
                        </div>
                     

                        @if (ViewBag.scode == "1")
                        {
                            <div class="hr hr-2 dotted"></div>
                            <div class="alert alert-success">
                                <button type="button" class="close" data-dismiss="alert">
                                    <i class="icon-remove"></i>
                                </button>

                                <strong>
                                    <i class="icon-ok"></i>
                                    提示信息
                                </strong>

                                信息保存成功!
																
                            </div>
                        }
                        @if (ViewBag.scode == "0")
                        {
                            <div class="hr hr-2 dotted"></div>
                            <div class="alert alert-danger">
                                <button type="button" class="close" data-dismiss="alert">
                                    <i class="icon-remove"></i>
                                </button>

                                <strong>
                                    <i class="icon-remove"></i>
                                    错误提示
                                </strong>

                                @Html.ValidationSummary(true)

                            </div>

                        }
                        <div class="clearfix form-actions">
                            <div class="col-md-offset-3 col-md-9">
                                <button class="btn btn-info" type="submit">
                                    &nbsp;&nbsp;<i class="ace-icon fa fa-check bigger-110"></i>
                                    保存&nbsp;&nbsp;
                                </button>

                                &nbsp; &nbsp; &nbsp;
                                <button class="btn" type="button" onclick="funBack()">
                                    &nbsp;&nbsp;<i class="ace-icon fa fa-undo bigger-110"></i>
                                    返回&nbsp;&nbsp;
                                </button>
                            </div>
                        </div>




                    </div>



                </div>

            </div>
        }

    </div>


</div>
@section js{
    <script src="/assets/js/jquery.validate.min.js"></script>
    <script src="/assets/js/jquery.validate.unobtrusive.js"></script>
    <script src="/assets/js/jquery.validate.unobtrusive.bootstrap.js"></script>
    <script type="text/javascript">
        function funBack() {
            document.location = "/Customer/Index/0?m=@ViewBag.m&f=@ViewBag.f&p=@ViewBag.p&fid=@ViewBag.fid&keywords=@ViewBag.keywords";
        }

    </script>
}